#ifndef __WIDGET_CLOCK_DIGITAL_H__
#define	__WIDGET_CLOCK_DIGITAL_H__

#include <QWidget>
#include <QFont>
#include <QString>
#include <QDateTime>
#include <QPaintEvent>

class DigitalClockWidget: public QWidget
{
	Q_OBJECT

public:
	explicit DigitalClockWidget(QWidget* parent = nullptr);
	
	void setTime(const QDateTime& time);
	void setShowSeconds(bool show);
	void setDarkTheme(bool dark);
	void setUse24Hour(bool);
protected:
	void paintEvent(QPaintEvent* event) override;

	void updateDisplay();
private:
	QDateTime m_time;
	bool m_showSeconds;
	bool m_darkTheme;
	bool m_user24Hour;
	QString m_timeString;
	QString m_dateString;
	QFont m_timeFont;
	QFont m_dateFont;
};

#endif	// __WIDGET_CLOCK_DIGITAL_H__